chore: add test of all supported BigQuery data types#17570
Conversation
This should be helpful in more thorough testing of the new compiler. Towards b/527509188
There was a problem hiding this comment.
Code Review
This pull request expands the nested_structs test dataset and schema to include a wide variety of data types (such as boolean, integers, floats, JSON, dates, timestamps, geography, and decimals) and edge cases. It also updates the nested_structs_pandas_df fixture to manually parse these types and adds a comprehensive test suite to verify their behavior. Feedback was provided regarding a potential compatibility issue with datetime.datetime.fromisoformat parsing the trailing 'Z' suffix in Python versions older than 3.11.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
Switching to draft until checks are green |
| import json | ||
|
|
||
| import numpy as np |
There was a problem hiding this comment.
Shall we move this to the top of the file?
| df["json_col"] = df["json_col"].apply(to_json_str).astype(dtypes.JSON_DTYPE) | ||
|
|
||
| # timestamp_col | ||
| import datetime |
There was a problem hiding this comment.
style nit: maybe move this import to the top of the file?
This should be helpful in more thorough testing of the new compiler.
Towards b/527509188
🦕